home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
commodore-users-of-norman
/
CUON_##_(07-1985).d64
/
what am i
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2019-04-13
|
2KB
|
49 lines
0 REM - 'WHAT AM I' WRITTEN BY ALAN J. WORMSER -- JUNE 25, 1985
1 REM - ADDR: 1346 CROWN POINT, APT. C, NORMAN, OK 73069
2 REM - THIS PROGRAM USES THE DYNAMIC KEYBOARD TO ADD DATA STATEMENTS
3 REM - NQ = # OF QUESTIONS Q$ = QUESTION G$ = GUESS PTR = POINTER
4 REM - AFTER PLAYING A SESSION WITH THE COMPUTER, SAVE THE NEW VERSION
5 PRINT"[147]THINK OF AN ANIMAL, THEN ANSWER":PRINT"THE YES/NO QUESTIONS.
6 [153]"THIS IS A SELF-MODIFYING PROGRAM...
7 PRINT"THE MORE YOU PLAY, THE MORE IT LEARNS!
8 [153]"IF YOU MAKE A MISTAKE, HIT THE":[153]"RUN/STOP KEY AND RE-RUN THE PROGRAM.
9 PRINT"HIT ANY KEY TO GO ON":POKE198,0:WAIT198,1:GETA$
10 NQ= 0
12 PTR=0:BEGIN=500
50 READ Q$,Q,G$,G
51 PRINT""Q$"? (Y/N)"
52 POKE198,0:WAIT198,1:GETA$:IFA$<>"Y"ANDA$<>"N"THEN52
53 IFA$="Y"THEN56
54 PRINT"NO":IFQ=0THENG1=G:Q1=NQ-PTR+1:GOTO72
55 PTR=PTR+Q:FORI=1TOQ:READQ$,Q,G$,G:NEXT:GOTO51
56 PRINT"YES":PRINT"IS IT A "G$"? (Y/N)"
57 POKE198,0:WAIT198,1:GETA$:IFA$<>"Y"ANDA$<>"N"THEN57
58 IFA$="Y"THEN62
59 PRINT"NO":IFG=0THENQ1=Q:G1=NQ-PTR+1:GOTO72
60 PTR=PTR+G:FORI=1TOG:READQ$,Q,G$,G:NEXT:GOTO51
62 PRINT"*** HOORAY, I GUESSED IT RIGHT! ***"
64 PRINT"WANNA TRY ANOTHER ONE? (Y/N)"
66 POKE198,0:WAIT198,1:GETA$:IFA$="Y"THENRUN
68 PRINT"[147]SAVE THIS VERSION TO TAPE OR DISK"
69 PRINT"IF YOU HAVE MADE ANY ADDITIONS TO IT.":END
70 REM ** ROUTINE TO ADD QUESTIONS AND GUESSES **
72 PRINT"WOW, I GUESS I DON'T KNOW THAT ONE!
73 [153]"WHAT IS IT (ONE WORD)?
74 INPUTG1$
76 PRINT"NOW TYPE IN A QUESTION TO HELP ME GUESS IT.
77 [153]"...PLEASE KEEP IT TO UNDER 40 COLUMNS.
78 INPUTQ1$
79 PRINT"ANIMAL:":PRINTG1$:PRINT"QUESTION":PRINTQ1$:PRINT"IS THAT CORRECT? (Y/N)
80 [151]198,0:[146]198,1:[161]A$:[139]A$[179][177]"Y"[167]73
81 [153]"ONE MOMENT, WHILE I MEMORIZE THAT
82 PRINT"HIT ANY KEY TO GO ON":POKE198,0:WAIT198,1:GETA$
84 PRINT"[147]10 NQ="NQ+1
90 PRINTBEGIN+PTR"DATA"Q$CHR$(44)Q1CHR$(44)G$CHR$(44)G1
100 PRINTBEGIN+NQ+1"DATA"Q1$",0,"G1$",0"
102 PRINT"GOTO110"
104 POKE198,6:POKE631,19:FORI=632TO636:POKEI,13:NEXT:END
110 PRINT"[147]I HAVE MODIFIED MY PROGRAM..."
112 PRINT"YOU MAY SAVE THIS NEW VERSION":PRINT"IN THE NORMAL MANNER."
114 GOTO64
500 DATAIS IT A KIND OF MAMMAL, 0 ,DOG, 0